<?php
/**
 * SocialEngine
 *
 * @category   Application_Core
 * @package    Payment
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @license    http://www.socialengine.net/license/
 * @version    $Id: Menus.php 8221 2011-01-15 00:24:02Z john $
 * @author     John Boehr <j@webligo.com>
 */

/**
 * @category   Application_Core
 * @package    Payment
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @license    http://www.socialengine.net/license/
 */
class Payment_Plugin_Menus {
	public function onMenuInitialize_UserSettingsPayment($row) {
		// Have any gateways or packages been added yet?
		if (Engine_Api::_ ()->getDbtable ( 'gateways', 'payment' )->getEnabledGatewayCount () <= 0 || Engine_Api::_ ()->getDbtable ( 'packages', 'payment' )->getEnabledNonFreePackageCount () <= 0) {
			return false;
		}
		return true;
	}
}